/*
 * Copyright (c) 2006-2019, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2019-10-26     ChenYong     first version
 */

#ifndef __BOARD_H__
#define __BOARD_H__

#include <rtthread.h>
#include <${soc_type}.h>
#include "drv_common.h"

#ifdef __cplusplus
extern "C" {
#endif

/*-------------------------- UART CONFIG BEGIN --------------------------*/

/** Once the corresponding UART is configured, it can be used as a console or other purposes.
  *
  * STEP 1, define macro define related to the serial port opening based on the serial port number
  *                 such as     #define BSP_USING_UATR1
  *
  * STEP 2, according to the corresponding pin of serial port, write the related serial port information
  *                 such as     #define UART1_TX_PORT   GPIOA
  *                             #define UART1_RX_PORT   GPIOA
  *                             #define UART1_TX_PIN    GPIO_PIN_9
  *                             #define UART1_RX_PIN    GPIO_PIN_10
  *
  * Attention: 1. Nano project haven't support DMA, if you want use DMA unless you configure it by yourself.
  *            2. When at latest one serial port is configured, the last serial port will be as console. You can
  *            rewrite rt_hw_usart_init function to realize your logic.
  *
  *
  */

#define BSP_USING_${uart_name}

#define ${uart_name}_TX_PORT       ${tx_port}
#define ${uart_name}_RX_PORT       ${rx_port}
#define ${uart_name}_TX_PIN        ${tx_pin}
#define ${uart_name}_RX_PIN        ${rx_pin}
/*-------------------------- UART CONFIG END --------------------------*/

/*-------------------------- ROM/RAM CONFIG BEGIN --------------------------*/
${rom_ram_config_list}
/*-------------------------- ROM/RAM CONFIG END --------------------------*/

void SystemClock_Config(void);

#ifdef __cplusplus
}
#endif

#endif /* __BOARD_H__ */

